// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'DeviceId',
        footer: "Foots",
        cnName: '设备档案',
        name: 'Device',
        newTabEdit: false,
        url: "/Device/",
        sortName: "DeviceId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"DeviceClassfiyId":[],"Code":"","Name":"","FrontPicture":"","DeviceType":"","DeviceLocation":"","DeviceSerialNumber":"","Spec":"","Size":"","Weight":"","User":"","DepartmentId":[],"RelatedAsset":"","BackPicture":"","RelatedMaterialName":"","EnabledDate":"","DeviceStatus":"","IsEnabled":"","DeviceParameter":""};
    const editFormOptions = [[{"dataKey":"设备分类级联","data":[],"title":"设备分类","field":"DeviceClassfiyId","type":"cascader"},
                               {"title":"设备编码","required":true,"field":"Code","type":"text"},
                               {"title":"设备名称","required":true,"field":"Name","type":"text"},
                               {"title":"正面图片","field":"FrontPicture","type":"img"}],
                              [{"dataKey":"设备类型","data":[],"title":"设备类型","field":"DeviceType","type":"select"},
                               {"title":"设备位置","field":"DeviceLocation","type":"text"},
                               {"title":"设备序列号","field":"DeviceSerialNumber","type":"text"}],
                              [{"title":"规格型号","field":"Spec","type":"text"},
                               {"title":"尺寸","field":"Size","type":"text"},
                               {"title":"重量","field":"Weight","type":"text"}],
                              [{"dataKey":"职员","data":[],"title":"使用人","field":"User","type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"车间部门","field":"DepartmentId","type":"cascader"},
                               {"title":"关联资产","field":"RelatedAsset","type":"text"},
                               {"title":"反面图片","field":"BackPicture","type":"img"}],
                              [{"title":"关联物料","field":"RelatedMaterialName","type":"text"},
                               {"title":"启用日期","field":"EnabledDate","type":"date"},
                               {"dataKey":"设备状态","data":[],"title":"设备状态","field":"DeviceStatus","type":"radio"}],
                              [{"title":"设备参数","field":"DeviceParameter","type":"textarea"},
                               {"dataKey":"是否","data":[],"title":"是否启用","required":true,"field":"IsEnabled","type":"radio"}]];
    const searchFormFields = {"Code":"","Name":""};
    const searchFormOptions = [[{"title":"设备编码","field":"Code","type":"like"},{"title":"设备名称","field":"Name","type":"like"}]];
    const columns = [{field:'DeviceId',title:'设备档案标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceClassfiyId',title:'设备分类',type:'int',bind:{ key:'设备分类级联',data:[]},width:110,align:'left'},
                       {field:'Code',title:'设备编码',type:'string',link:true,width:110,require:true,align:'left'},
                       {field:'Name',title:'设备名称',type:'string',width:110,require:true,align:'left'},
                       {field:'FrontPicture',title:'正面图片',type:'string',width:220,align:'left'},
                       {field:'DeviceType',title:'设备类型',type:'int',bind:{ key:'设备类型',data:[]},width:80,align:'left'},
                       {field:'DeviceLocation',title:'设备位置',type:'string',width:120,align:'left'},
                       {field:'DeviceSerialNumber',title:'设备序列号',type:'string',width:120,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:120,align:'left'},
                       {field:'Size',title:'尺寸',type:'string',width:120,align:'left'},
                       {field:'Weight',title:'重量',type:'string',width:120,align:'left'},
                       {field:'User',title:'使用人',type:'int',bind:{ key:'职员',data:[]},width:80,align:'left'},
                       {field:'DepartmentId',title:'车间部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,align:'left'},
                       {field:'RelatedAsset',title:'关联资产',type:'string',width:120,align:'left'},
                       {field:'BackPicture',title:'反面图片',type:'string',width:220,align:'left'},
                       {field:'RelatedMaterialId',title:'关联物料标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'RelatedMaterialName',title:'关联物料',type:'string',width:120,align:'left'},
                       {field:'EnabledDate',title:'启用日期',type:'datetime',width:150,align:'left'},
                       {field:'DeviceStatus',title:'设备状态',type:'int',bind:{ key:'设备状态',data:[]},width:110,align:'left'},
                       {field:'IsEnabled',title:'是否启用',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'DeviceParameter',title:'设备参数',type:'string',width:150,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'}];
    const detail ={columns:[]};
    const details = [  { 
                    cnName: '设备技术参数',
                    table: 'DeviceTechnicalParameter',
                    columns: [{field:'DeviceTechnicalParameterId',title:'技术参数标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceId',title:'设备档案标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ParameterName',title:'参数名称',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'ParameterValue',title:'参数值',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'ParameterUnit',title:'参数单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,edit:{type:'select'},align:'left'}],
                    sortName: 'DeviceTechnicalParameterId',
                    key: 'DeviceTechnicalParameterId',
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            },                    { 
                    cnName: '备件清单',
                    table: 'DevicePartList',
                    columns: [{field:'DevicePartListId',title:'备件清单标识',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceId',title:'设备档案标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'DevicePartId',title:'备件标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'DevicePartNumber',title:'备件编码',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'DevicePartName',title:'备件名称',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'DevicePartSpec',title:'规格型号',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'StandardQty',title:'标准备件数量',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'SafetyQty',title:'备件安全数量',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'UnitId',title:'计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,edit:{type:'select'},align:'left'}],
                    sortName: 'DevicePartListId',
                    key: 'DevicePartListId',
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            },                    { 
                    cnName: '设备履历',
                    table: 'DeviceHistory',
                    columns: [{field:'DeviceHistoryId',title:'设备履历标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceId',title:'设备档案标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'WorkOrderNumber',title:'工单编号',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'WorkOrderName',title:'工单名称',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'MaintainWorkTypeId',title:'维护作业类型标识',type:'int',width:80,hidden:true,edit:{type:''},align:'left'},
                       {field:'MaintainWorkTypeName',title:'维护作业类型名称',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'Executor',title:'执行人',type:'int',bind:{ key:'职员',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'ExecutionStatus',title:'执行情况',type:'int',bind:{ key:'设备执行情况',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'BillType',title:'单据类型',type:'int',bind:{ key:'设备单据类型',data:[]},width:110,edit:{type:'select'},align:'left'}],
                    sortName: 'DeviceHistoryId',
                    key: 'DeviceHistoryId',
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            },                    { 
                    cnName: '维护计划',
                    table: 'DeviceMaintainPlan',
                    columns: [{field:'DeviceMaintainPlanId',title:'设备维护计划标识',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceId',title:'设备档案标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'MaintainPlanId',title:'维护计划标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'PlanNo',title:'计划编号',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'MaintainWorkTypeId',title:'维护作业类型',type:'int',width:80,hidden:true,align:'left'},
                       {field:'MaintainWorkTypeName',title:'维护作业类型',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'PlanName',title:'计划名称',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'RuleType',title:'规则类型',type:'int',width:80,edit:{type:'text'},align:'left'},
                       {field:'ExecuteStartTime',title:'执行开始时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left'},
                       {field:'ExecuteEndTime',title:'执行结束时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left'},
                       {field:'FinallyExecuteTime',title:'最后一次执行时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left'}],
                    sortName: 'DeviceMaintainPlanId',
                    key: 'DeviceMaintainPlanId',
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            },                    { 
                    cnName: '转移记录',
                    table: 'DetailTransferRecond',
                    columns: [{field:'DetailTransferRecondId',title:'转移记录标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DeviceId',title:'设备档案标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'TransferRecondNo',title:'设备转移记录编号',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'TransferRecondStatus',title:'设备转移记录状态',type:'int',bind:{ key:'audit',data:[]},width:110,edit:{type:''},align:'left'},
                       {field:'OutDepartmentId',title:'原使用部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,edit:{type:'cascader'},align:'left'},
                       {field:'OutUser',title:'原使用人',type:'int',bind:{ key:'职员',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'OutDeviceLocation',title:'原设备位置',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'AuditDate',title:'设备转移记录审核时间',type:'datetime',width:110,edit:{type:'date'},align:'left'},
                       {field:'DepartmentId',title:'使用部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,edit:{type:'cascader'},align:'left'},
                       {field:'User',title:'使用人',type:'int',bind:{ key:'职员',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'DeviceLocation',title:'设备位置',type:'string',width:110,edit:{type:'text'},align:'left'}],
                    sortName: 'DetailTransferRecondId',
                    key: 'DetailTransferRecondId',
                    buttons:[],
                    delKeys:[],
                    detail:null
                                            }];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}